FBSAMPLE

Section: User Commands (1)
Updated: 25-Jun-90
Index Return to Main Contents
 

NAME

fbsample - convert 1bit image to grayscale by sampling  

SYNOPSIS

fbsample [ -t'title' -c'credits' -g'grain' -n'nbr']
         [ -<type> ] < bitmap > image
 

DESCRIPTION

Samples a 1 bit deep pbm file using a square neighborhood of the specified size, and outputs an 8 bit file. You will want to run fbnorm on the output to expand the scale to 255, and there will be a small loss of sharpness, so fbsharp will also be useful. Once you have an 8 bit file, you can resize it arbitrarily, and then convert it back to a 1 bit file, if need be. The default neighborhood size is 8 by 8, which gives 65 different gray levels.  

OPTIONS

-g
grain size. The sample is taken every grain pixels.
-n
neighborhood size. The value will be the number of light pixels in the nearby NxN square. The values can range from 1 to 16.
-t'title'
title, specify a character string (up to 80 characters) to describe the image. The default is no title.
-c'credits'
credits or subtitle, specify a second character string (up to 80 characters) to describe the image. The default is no credit string.
-B
face format, as used by Bennet Yee's face program at CMU.
-F
FBM, format (by default, the default). You are guaranteed not to lose information by specifying FBM as the default.
-G
GIF, Compuserve GIF format.
-I
IFF format, interleaved bitmaps (ILBM), used by Amigas.
-P
PBM, Jef Poskanzer's bitmap format.
-S
sun, Sun rasterfiles (not run length encoded).

 

EXAMPLE

Suppose you have a 480 by 600 face format file (-B) that you wish to shrink to 300 by 375 and convert to PostScript (say for inclusion in your door label). Here's a pipeline to do that:

    % fbsample -n5 -g1 < my.face |     # sample 5x5
      fbnorm -b4 -w1 |                  # normalize
      fbext -w300 |                    # make 300 pixels wide
      fbhalf -s20 |                    # halftone and really sharpen
      pbm2ps -s 1 > sdoor.ps            # convert to postscript
 

SEE ALSO

fbnorm(1) to normalize the output, fbm(1) for general discussion, pbm(1) for PBM routines.  

BUGS

None known.  

HISTORY

Copyright (C) 1989,1990 by Michael Mauldin. Permission is granted to use this file in whole or in part for any purpose, educational, recreational or commercial, provided that this copyright notice is retained unchanged. This software is available to all free of charge by anonymous FTP and in the UUNET archives.
25-Jun-90 Michael Mauldin at Carnegie Mellon University
Release 1.0 mlm@cs.cmu.edu
07-Mar-89 Michael L. Mauldin at Carnegie Mellon University
Beta release (version 0.9) mlm@cs.cmu.edu


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLE
SEE ALSO
BUGS
HISTORY

This document was created by man2html, using the manual pages.
Time: 13:25:58 GMT, October 17, 2022